import request from '@/utils/request'

export function page(query) {
  return request({
    url: 'device/page',
    method: 'get',
    params: query
  })
}
export function refreshPage(query) {
  return request({
    url: '/device/refresh',
    method: 'get',
    params: query
  })
}
export function list(query) {
  return request({
    url: 'device/list',
    method: 'get',
    params: query
  })
}
export function details(id) {
  return request({
    url: 'device/details/' + id,
    method: 'get'
  })
}

export function save(data) {
  return request({
    url: 'device/save',
    method: 'put',
    data: data
  })
}

export function update(data) {
  return request({
    url: 'device/update',
    method: 'put',
    data: data
  })
}

export function del(data) {
  return request({
    url: 'device/delete',
    method: 'post',
    data: Array.isArray(data)?data:[data]
  })
}


export function upadteDevicesstatus(data) {
  return request({
    url: 'device/upadteDevicesStatus',
    method: 'post',
    data,
  })
}







